package com.linkwechat.service;

import com.linkwechat.common.vo.qw.GetVisitUserVO;
import com.linkwechat.domain.wecom.vo.ConfigSignatureVO;
import com.linkwechat.domain.wecom.vo.department.QwDeptListVO;
import com.linkwechat.domain.wecom.vo.user.QwDeptUserVO;

public interface QwService {
    /**
     * 自建应用的accesstoken
     * @param corpId
     * @param corpSecret
     * @return
     */
    String accessToken(String corpId, String corpSecret);


    /**
     * 自建应用  联系人的accessToken
     * @param corpId
     * @param contactSecret
     * @return
     */
    String contactAccessToken(String corpId, String contactSecret);


    /**
     * 获取访问用户的身份
     * https://developer.work.weixin.qq.com/document/path/91023
     * @param code
     * @return
     */
    GetVisitUserVO getLoginAuthVisitUser(String code,String accessToken);

    /**
     * https://developer.work.weixin.qq.com/document/path/95350
     * @param accessToken
     * @param id
     * @return
     */
    QwDeptListVO deptList(String accessToken, String id);

    /**
     * 获取企业的jsapiTicket
     * @param accessToken
     * @return
     */
    String getJsapiTicket(String accessToken);

    /**
     * https://developer.work.weixin.qq.com/document/24364
     * @param jsapiTicket
     * @param url
     * @return
     * 企业的
     */
    ConfigSignatureVO getConfigSignature(String jsapiTicket, String url);


    /**
     * https://developer.work.weixin.qq.com/document/path/90506
     * 获取应用的的jsapiTicket
     * @param accessToken
     * @return
     */
    String getAgentJsapiTicket(String accessToken,String corpId);

    /**
     * https://developer.work.weixin.qq.com/document/24364
     * @param jsapiTicket
     * @param url
     * @return
     * 企业的
     */
    ConfigSignatureVO getAgentConfigSignature(String jsapiTicket, String url);

    /**
     * 获取用户id列表
     * https://developer.work.weixin.qq.com/document/path/96067
     * @param contactAccessToken
     * @param nextCursor
     * @return
     */
    QwDeptUserVO deptUser(String contactAccessToken, String nextCursor);
}
